package cn.lili.modules.goods.entity.dos;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

@Data
@TableName("li_goods_down_record")
@ApiModel(value = "商品下架记录表")
@NoArgsConstructor
public class GoodsDownRecord implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "商品ID")
    @NotEmpty(message = "商品ID不能为空")
    private String goodsId;

    @ApiModelProperty(value = "商品名称")
    @NotEmpty(message = "商品名称不能为空")
    private String goodsName;

    /**
     * @see cn.lili.common.security.enums.SceneEnums
     */
    @ApiModelProperty(value = "场景", allowableValues = "MEMBER,STORE,SUPPLIER,MANAGER")
    private String scene;

    @ApiModelProperty(value = "商家id")
    private String storeId;

    @ApiModelProperty(value = "供应商ID")
    private String supplierId;

    @ApiModelProperty(value = "下架原因")
    private String reason;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
